#include <iostream>
#include <cstring>
#include <vector>

using namespace std;







int main()
{
    /*SeqList_struct q_struct;
    init(q_struct);

    int a[]{1, 2, 3, 4, 5};
    SeqList_array<int> q_array(a, 5);

    LinkList<int> L{};
    L.insert(1);

    L.insert(2, 5);
    L.insert(3, 6);
    L.insert(4, 7);

    try
    {
        DuLinkList<int> du_links;
        du_links.insert(1);
        du_links.insert(2);
        du_links.insert(3, 3);
        du_links.remove(2);
        du_links.remove(2);
    }
    catch (...)
    {
    std:
        cerr << "exception" << endl;
    }


    SeqStruct<int> struct_;
    struct_.Push(1);
    struct_.Push(2);
    struct_.Pop();

    /*const int res = Pop(struct_);
    cout << res;#1#


    /*  ?????????#1#
    SeqStack<int> seq_stack(10);
    seq_stack.Push(1);
    seq_stack.Pop();
    seq_stack.Push(2);
    seq_stack.Push(3);
    seq_stack.Push(4);
    seq_stack.Push(5);
    seq_stack.Push(6);
    seq_stack.Push(7);
    seq_stack.Push(8);
    seq_stack.Push(9);
    seq_stack.Push(10);
    seq_stack.Push(11);

    /*const int length = seq_stack.top;
    for (int i = 0; i < length; i++)
    {
        const int sout = seq_stack.Pop();
        cout<< sout << endl;
    }#1#

    LinkStack<int> link_stack;
    link_stack.Push(1);
    link_stack.Pop();
    link_stack.Push(1);
    link_stack.Push(1);
    link_stack.Push(1);
    link_stack.Push(1);
    link_stack.Push(1);
    link_stack.Push(1);
    link_stack.Push(1);

    /*bool flag = true;
    while (flag)
    {
        int res = -1;
        try
        {
            res = link_stack.Pop();
            cout << res <<endl;
        }catch (...)
        {
            flag = false;
        }
    }#1#

    int res = Stack<int>::BinaryConvert(1000, 8);
    cout << res << endl;

    list<string> strings = {"[","[","(", "1", "+", "2", ")", "*", "3","]","/","3","]"};

    res = Stack<string>::formulaMatch(strings);
    cout << res << endl;*/


    /*pmr::vector<pmr::vector<int>> arr = {{0,-1,0,10},{0,0,0,-1},{0,-1,0,0},{0,0,0,-1}};
    LinkStack<Point> path = Stack<int>::optimizePath(arr);
    while (!path.isEmpty())
    {
        Point p = path.Pop();
        cout << p.location.x << " " << p.location.y << endl;
    }

    LinkStack<int> x;
    x.Push(3);
    x.Push(2);
    x.Push(1);
    LinkStack<int> y;
    LinkStack<int> z;
    Stack<int>::Hanoi(3,x,y,z);*/

    /*sstring s = "6ababac";
    int length = stoll (string{static_cast<char>(s[0])});
    int next[length+1];
    int nextval[length+1];
    next[0] = 6;
    Kmp::getNext(s, next);
    Kmp::getNextVal(s, next, nextval);
    for (int i = 0; i < length+1; i++)
    {
        cout << next[i] << endl;
    }

    for (int i = 0; i < length+1; i++)
    {
        cout << nextval[i] << endl;
    }*/

}
